package com.xxxx.server.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.xxxx.server.mapper.MailLogMapper;
import com.xxxx.server.pojo.MailLog;
import com.xxxx.server.service.IMailLogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author zhoubin
 * @since 2020-08-17
 */
@Service
public class MailLogServiceImpl extends ServiceImpl<MailLogMapper, MailLog> implements IMailLogService {

    @Autowired
    MailLogMapper mailLogMapper;


    //通过状态获取邮件的发送日志信息
    @Override
    public List<MailLog> getMailSendLogsByStatus() {
        return mailLogMapper.getMailSendLogsByStatus();
    }

    //更新邮件发送的状态
    @Override
    public Integer updateMailSendLogStatus(String msgId, Integer status) {
        return mailLogMapper.updateMailSendLogStatus(msgId, status);
    }

    //更新
    @Override
    public Integer updateCount(String msgId, Date date) {
        return mailLogMapper.updateCount(msgId,date);
    }

    //增加
    @Override
    public Integer insert(MailLog mailSendLog) {
        return mailLogMapper.insert(mailSendLog);
    }
}
